package com.hundun.hddeal.service;


import com.github.pagehelper.PageInfo;
import com.hundun.hddeal.entity.Order;
import com.hundun.hddeal.entity.OrderDetail;
import com.hundun.hddeal.entity.OrderNew;
import com.hundun.hddeal.response.Result;
import com.hundun.hddeal.vo.StatusCountVo;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.util.Date;


public interface OrderDetailService {


    /** 增加订单详情 */
    Result<OrderDetail> addOrderDetail(OrderDetail orderDetail);

    String pay (Long orderId);

    Result<PageInfo<OrderNew>> getAll(String adId, Byte status, Integer page,
                                      Integer size, String needName, Date startTime, Date endTime,String hostId,String orderId,String gzhName);

    Result<PageInfo<OrderDetail>> getAll1(String mtId, Byte status, Integer page, Integer size,
                                          String orderId, String needName, String gzhName, Date startTime, Date endTime,String hostId) throws UnsupportedEncodingException, NoSuchAlgorithmException;

    /** 查询各个订单状态的条数  */
    //int selectAllStatus(Byte status,String mtId);

    Result<OrderNew> selectByPrimaryKey(Long id);

    Result updateByPrimaryKeySelective(OrderDetail record);

    Result updateOrederStatus(Byte status,String orderId);

    /**查询媒体主id集合*/
    Result<PageInfo<Order>> mtHostList(String mtId, Integer page, Integer size, String hostId,
                                       String needName, Date startTime, Date endTime,Byte status);

    /**查询广告主id集合*/
    Result<PageInfo<Order>> adHostList(String adId,Integer page,Integer size,String hostId,
                                             String needName,Date startTime, Date endTime,Byte status);

    /**查询广告订单状态条数*/
    Result<StatusCountVo> getAdCount(String adId);

    /**查询媒体订单状态条数*/
    Result<StatusCountVo> getMtCount(String mtId);

}
